/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_orm.htm
 *
 * Zhiqim ORM is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.orm.test.dboext;

import java.sql.Timestamp;
import org.zhiqim.orm.test.dbo.TInteger;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 整型和时间视图 对应视图《T_INTEGER_DATETIME》
 */
@AnAlias("TIntegerDatetime")
@AnNew
@AnView("T_INTEGER,T_DATETIME")
@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="T_INTEGER", lColumn="T_ID", rTable="T_DATETIME", rColumn="T_ID")})
public class TIntegerDatetime extends TInteger
{
    private static final long serialVersionUID = 1L;

    @AnViewField(table="T_DATETIME", column="T_DATETIME")    private Timestamp tDatetime;    //2.测试日期

    public String toString()
    {
        return Jsons.toString(this);
    }

    public Timestamp tDatetime()
    {
        return tDatetime;
    }

    public TIntegerDatetime tDatetime(Timestamp tDatetime)
    {
        this.tDatetime = tDatetime;
        return this;
    }
}
